<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <script src="../js/common/jquery-3.4.1.min.js"></script>
    <link rel="stylesheet" href="../css/message/chatFrame.css">
</head>
<body>
<script>

    let inputHid = true;

    $(function () {

        $("#productName").hide();

        $("#title").click(function () {
            if (inputHid) {
                $("#productName").show();
            } else {
                $("#productName").hide();
            }
            inputHid = !inputHid;
        });


        // $("#productName").focus(function () {
        //     console.log("输入框获得焦点")
        // });

        $("#productName").blur(function () {
            // alert("输入框失去焦点");
            console.log("输入框失去焦点")
        });

    })


</script>

<form>

    <div style="display: flex">
        <div id="title" style="cursor: pointer">产品中心</div>
        <input id="productName" placeholder="请输入商品名">
    </div>


    <div class="alertDialog-right" style="margin-left: 20px"></div>
    <div class="alertDialog-left" style="margin-left: 20px"></div>

</form>

</body>
</html>